package com.woniuxy.cloud.carl.carlgoods.client;


import com.woniuxy.cloud.carl.carlgoods.client.dto.SpuDto;
import com.woniuxy.cloud.carl.carlgoods.client.param.FindSpuByContionParam;
import com.woniuxy.cloud.carl.carlgoods.client.util.MyPage;
import com.woniuxy.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient(contextId = "SpuQueryClient",name="carlgoods")
public interface SpuQueryClient {
    @PostMapping("/findSpuByCondition")
    public Result<MyPage<SpuDto>> findSpuByCondition(@RequestBody FindSpuByContionParam param);
@GetMapping("/findSpuById")
public Result<SpuDto> findSpuById(@RequestParam("spuId") Long spuId);

    @GetMapping("/findSpuBycategoryId")
    public Result<List<SpuDto>> findSpuBycategoryId(@RequestParam("categoryId")Long categoryId);


}
